package com.atguigu.tingshu.order.client;

import com.atguigu.tingshu.common.result.Result;
import com.atguigu.tingshu.model.order.OrderInfo;
import com.atguigu.tingshu.order.client.impl.OrderInfoDegradeFeignClient;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

import java.util.Map;

/**
 * <p>
 * 产品列表API接口
 * </p>
 *
 * @author qy
 */
@FeignClient(value = "service-order", fallback = OrderInfoDegradeFeignClient.class)
public interface OrderInfoFeignClient {

    @GetMapping("/api/order/orderInfo/findOrderInfoByOrderNo/{orderNo}")
    public Result<OrderInfo> findOrderInfoByOrderNo(@PathVariable("orderNo")String orderNo);

    @GetMapping("api/order/orderInfo/getOrderSaleStates/{date}")
    public Result<Map<Long , Integer>> getOrderSaleStates(@PathVariable("date")String date);
}